package com.wframe.project.jnd.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
 * Created by lwb on 2017/6/9.
 */
public class CollectionUtils {
    /**
     * 差集
     *
     * @param minuend
     * @param subtrahend
     * @return
     */
    public static Set<String> subtract(Set<String> minuend, Set<String> subtrahend) {
        List<String> list = new ArrayList<>(subtrahend);
        list.forEach(item -> {
            minuend.remove(item);
        });
        return minuend;
    }
}
